/*
 *  Copyright (c) 2022 ZhuHai Jieli Technology Co.,Ltd.
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

#ifndef    _SPI_INTERFACE_H_
#define _SPI_INTERFACE_H_

typedef enum {
    SPI0_PORTA = 0,
    SPI1_PORTA,
    SPI1_PORTB,
    SPI2_PORTA,
    SPI2_PORTB,
} SPI_PORT;

struct spi_platform_data {
    u32 clk_div;
    u8 master_port;
    u8 slave_port;
    u8 dma_en;
    u8 bidir_en;
};

#define SPI_PLATFORM_DATA_BEGIN(data) \
        static const struct spi_platform_data data = {

#define SPI_PLATFORM_DATA_END() \
};

extern const struct device_operations spi_test_ops;

void spi_test();

#endif
